房间管理API
获取房间列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object | Body | 是 | 命令参数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| building_id | String | Body | 楼栋ID |
| building_name | String | Body | 楼栋名称 |
| floors | []Object<floor> | Body | 楼层信息 |
floor说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| floor_id | String | Body | 楼层ID |
| floor_name | String | Body | 楼层名称 |
| residences | []Object<residence> | Body | 住宅信息 |
residence说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| residence_id | String | Body | 住宅ID |
| residence_no | String | Body | 住宅号码 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"building_id": "bx9a621c1ae77040d697bd2134700f57e",
"building_name": "test",
"floors": [
{
"floor_id": "fx9a621c1ae77040d697bd2134700f572",
"floor_name": "1",
"residences": [
{
"residence_id": "rx9a621c1ae77040d697bd2134700f574",
"residence_name": "101"
}
]
}
]
}
]
}
失败返回示例
见 接口失败返回
获取房间信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| building_id | String | Body | 楼栋ID |
| building_name | String | Body | 楼栋名称 |
| floor_id | String | Body | 楼层ID |
| floor_name | String | Body | 楼层名称 |
| residence_no | String | Body | 住宅号码 |
| room_type_id | String | Body | 房间类型ID |
| room_type_name | String | Body | 房间类型名称 |
| room_tag_id | String | Body | 房间标签ID |
| room_tag_name | String | Body | 房间标签名称 |
| order_id | String | Body | 订单ID |
| dirty | Boolean | Body | 判断是否脏房间 true:是 false:否 |
| occupied | Boolean | Body | 判断房间是否占用 true:是 false:否 |
| dnd | Boolean | Body | 判断房间是否勿扰 true:是 false:否 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "rx9a621c1ae77040d697bd2134700f57v"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"building_id": "brx9a621c1ae77040d697bd2134700f57",
"building_name": "test",
"floor_id": "fbrx9a621c1ae77040d697bd2134700f5",
"floor_name": "test",
"residence_no": "101",
"room_type_id": "rfbrx9a621c1ae77040d697bd2134700f",
"room_type_name": "test",
"room_tag_id": "rrfbrx9a621c1ae77040d697bd2134700",
"room_tag_name": "big",
"order_id": "orrfbrx9a621c1ae77040d697bd213470",
"dirty": true,
"occupied": true,
"dnd": false
}
}
失败返回示例
见 接口失败返回
更新房间状态
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| dirty | Boolean | Body | 是 | 判断是否脏房间 true:是 false:否 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_room_state",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"dirty": true
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取房间类型列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| room_type_id | String | Body | 房间类型ID |
| room_type_name | String | Body | 房间类型名称 |
| bed | Integer | Body | 床位 |
| occupancy | Integer | Body | 可入住人数 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_type_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"room_type_id": "rx9a621c1ae77040d697bd2134700f57e",
"room_type_name": "test",
"bed": 2,
"occupancy": 2
}
]
}
失败返回示例
见 接口失败返回
获取房间类型信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| room_type_id | String | Body | 是 | 房间类型ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| room_type_name | String | Body | 房间类型名称 |
| bed | Integer | Body | 床位 |
| occupancy | Integer | Body | 可入住人数 |
| residences | []Object<residence> | Body | 住宅信息 |
residence说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| residence_id | String | Body | 住宅ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_type_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_type_id": "rx9a621c1ae77040d697bd2134700f57e"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"room_type_name": "test",
"bed": 2,
"occupancy": 2,
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
失败返回示例
见 接口失败返回
创建房间类型信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| room_type_name | String | Body | 是 | 房间类型名称 |
| bed | Integer | Body | 是 | 床位 |
| occupancy | Integer | Body | 是 | 可入住人数 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| room_type_id | String | Body | 房间类型ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_room_type_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_type_name": "test",
"bed": 2,
"occupancy": 2,
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"room_type_id": "r2a621c1ae77040d697bd2134700f57ea"
}
}
失败返回示例
见 接口失败返回
更新房间类型信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| room_type_id | String | Body | 是 | 房间类型ID |
| room_type_name | String | Body | 是 | 房间类型名称 |
| bed | Integer | Body | 是 | 床位 |
| occupancy | Integer | Body | 是 | 可入住人数 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_room_type_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_type_id": "r2a621c1ae77040d697bd2134700f57ea",
"room_type_name": "test",
"bed": 2,
"occupancy": 2,
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除房间类型信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| room_type_id | String | Body | 是 | 房间类型ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_room_type_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_type_id": "rrbr2c4b070cc928496198944858b344f"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取房间标签列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| room_tag_id | String | Body | 房间标签ID |
| room_tag_name | String | Body | 房间标签名称 |
| residences | []Object<residence> | Body | 住宅信息 |
residence说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| residence_id | String | Body | 住宅ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_tag_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"room_tag_id": "rx9a621c1ae77040d697bd2134700f571",
"room_tag_name": "test",
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
]
}
失败返回示例
见 接口失败返回
获取房间标签信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| room_tag_id | String | Body | 是 | 房间标签ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| room_tag_name | String | Body | 房间标签名称 |
| residences | []Object<residence> | Body | 住宅信息 |
residence说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| residence_id | String | Body | 住宅ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_room_tag_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_tag_id": "rx9a621c1ae77040d697bd2134700f572"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"room_tag_name": "test",
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
失败返回示例
见 接口失败返回
创建房间标签信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| room_tag_name | String | Body | 是 | 房间标签名称 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| room_tag_id | String | Body | 房间标签ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_room_tag_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_tag_name": "test",
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"room_tag_id": "r2a621c1ae77040d697bd2134700f57e2"
}
}
失败返回示例
见 接口失败返回
更新房间标签信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| room_tag_id | String | Body | 是 | 房间标签ID |
| room_tag_name | String | Body | 是 | 房间标签名称 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_room_tag_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_tag_id": "r2a621c1ae77040d697bd2134700f57e1",
"room_tag_name": "test",
"residences": [
{
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除房间标签信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| room_tag_id | String | Body | 是 | 房间标签ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_room_tag_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"room_tag_id": "rrbr2c4b070cc928496198944858b343f"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取授权记录列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| record_id | String | Body | 记录ID |
| authorization_number | String | Body | 授权编号 |
| access_type | String | Body | 授权方式 password:PIN码 rf_card:射頻卡 qr_code:二维码 |
| guest_id | String | Body | 客人ID |
| guest_name | String | Body | 客人名称 |
| String | Body | 邮箱 | |
| phone | String | Body | 电话 |
| residence_id | String | Body | 住宅ID |
| residence_no | String | Body | 住宅号码 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| authorization_status | String | Body | 授权状态 |
| updated_time | String | Body | 更新时间,UTC |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_authorization_record_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"record_id": "rr31adc223cc4b3bedb6bd4742dedcfa5",
"authorization_number": "20250804152509933679",
"access_type": "password",
"guest_id": "grr31adc223cc4b3bedb6bd4742dedcfa",
"guest_name": "test",
"email": "",
"phone": "",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"residence_no": "12345",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03",
"authorization_status": "expired",
"updated_at": "2025-08-06 04:00:03"
}
]
}
失败返回示例
见 接口失败返回
获取授权记录信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| record_id | String | Body | 是 | 记录ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| authorization_number | String | Body | 授权编号 |
| access_type | String | Body | 授权方式 password:PIN码 rf_card:射頻卡 qr_code:二维码 |
| pin_code | String | Body | PIN码 |
| rf_card_number | String | Body | 射頻卡号 |
| qr_code_url | String | Body | 二维码地址 |
| guest_id | String | Body | 客人ID |
| guest_name | String | Body | 客人名称 |
| String | Body | 邮箱 | |
| phone | String | Body | 电话 |
| residence_id | String | Body | 住宅ID |
| residence_no | String | Body | 住宅号码 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| authorization_status | String | Body | 授权状态 |
| updated_time | String | Body | 更新时间,UTC |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_authorization_record_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"record_id": "rr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"authorization_number": "20250804152509933679",
"access_type": "password",
"pin_code": "123456",
"rf_card_number": "",
"qr_code_url": "",
"guest_id": "grr31adc223cc4b3bedb6bd4742dedcfa",
"guest_name": "test",
"email": "",
"phone": "",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"residence_no": "12345",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03",
"authorization_status": "expired",
"updated_at": "2025-08-06 04:00:03"
}
}
失败返回示例
见 接口失败返回
创建授权记录信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| room_tag_name | String | Body | 是 | 房间标签名称 |
| residences | []Object<residence> | Body | 是 | 住宅信息 |
residence说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| access_type | String | Body | 是 | 授权方式 password:PIN码 rf_card:射頻卡 qr_code:二维码 |
| pin_code | String | Body | 否 | PIN码 |
| rf_card_number | String | Body | 否 | 射頻卡号 |
| qr_code_url | String | Body | 否 | 二维码地址 |
| guest_id | String | Body | 是 | 客人ID |
| residence_id | String | Body | 是 | 住宅ID |
| start_time | String | Body | 是 | 开始时间,UTC |
| finish_time | String | Body | 是 | 结束时间,UTC |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| record_id | String | Body | 记录ID |
| authorization_number | String | Body | 授权编号 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_authorization_record_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"access_type": "password",
"pin_code": "123456",
"rf_card_number": "",
"qr_code_url": "",
"guest_id": "grr31adc223cc4b3bedb6bd4742dedcfa",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"start_time": "2025-08-06 03:00:03",
"end_time": "2025-08-06 03:30:03"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"record_id": "rr31adc223cc4b3bedb6bd4742dedcfa5",
"authorization_number": "20250804152509933679"
}
}
失败返回示例
见 接口失败返回
删除授权记录信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| record_id | String | Body | 是 | 记录ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_authorization_record_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"record_id": "rr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回